<!-- 任务档案弹窗 -->
<template>
    <j-modal
      :width="width"
      :visible="visible"
      :title="title"
      :fullscreen="true"
      wrapClassName="j-user-select-modal"
      @ok="submitCallback"
      @cancel="close"
      style="top:50px"
      cancelText="关闭">
      <!-- <ErpOmcPrepareProjectForm
        ref="realForm"
        @ok="submitCallback"
        @unButtonDisable="unButtonDisable"
        :disabled="true"
        normal></ErpOmcPrepareProjectForm> -->
      <ErpReportAuditForm
        ref="realForm"
        @ok="submitCallback"
        @unButtonDisable="unButtonDisable"
        :disabled="true"
        normal></ErpReportAuditForm>
      <template slot="footer">
        <a-button @click.stop="() => { visible = false }">关闭</a-button>
      </template>
    </j-modal>
  </template>
  
  <script>
  
  // import ErpOmcPrepareProjectForm from '@views/erp/omc/prepareproject/modules/ErpOmcPrepareProjectForm'
  
  export default {
    name: 'ErpReportReviewModel',
    components: {
      ErpReportAuditForm: () => import('@views/erp/omc/reportaudit/modules/ErpReportAuditForm')
    },
    data() {
      return {
        title: '操作',
        width: 1000,
        visible: false,
        realForm:null,
        disableSubmit: false,
        buttonDisable: false
      }
    },
    methods: {
      add() {
        this.visible = true
        this.$nextTick(() => {
          this.$refs.realForm.add();
        })
      },
      edit(record) {
        this.visible = true
        console.log(record, '打印modal')
        this.$nextTick(() => {
          this.$refs.realForm.edit(record);
        });
      },
      close() {
        this.$emit('close');
        this.visible = false;
      },
      submitCallback() {
        this.$emit('ok');
        this.visible = false;
      },
      handleOk() {
        this.buttonDisable = true
        this.$refs.realForm.submitForm();
      },
      handleCancel() {
        this.close()
      },
      unButtonDisable() {
        this.buttonDisable = false
      }
    }
  }
  </script>
  
  <style lang="less" scoped>
  /** Button按钮间距 */
  .ant-btn {
    margin-left: 30px;
    margin-bottom: 30px;
    float: right;
  }
  
  .drawer-footer {
    position: absolute;
    bottom: -8px;
    width: 100%;
    border-top: 1px solid #e8e8e8;
    padding: 10px 16px;
    text-align: right;
    left: 0;
    background: #fff;
    border-radius: 0 0 2px 2px;
    z-index: 999;
  }
  </style>
  